<link rel="stylesheet" href="../addons/jy_pingdd/resource/css/style.css" />
<style type="text/css">
.order_goods_img img {border: 1px solid rgb(215, 215, 215); border-image: none; width: 60px; height: 60px; display: block;}
.order_goods_price i {font-size: 9px;}
.order_goods_grab .order_goods_grab_txt {background: 0px 0px rgb(238, 51, 17); padding: 2px 3px; border-radius: 2px; color: rgb(255, 255, 255); display: inline-block;}
.tuan_g_price b {font-size: 18px; font-weight: 400; margin-right: 2px; margin-left: 5px;}
.tuan_g_price span {vertical-align: 1px;}
.order_status {height: 30px; color: rgb(221, 0, 0); line-height: 40px; float: left;}
.order_btn a {border-radius: 3px; width: 80px; height: 30px; text-align: center; color: rgb(255, 255, 255); line-height: 30px; margin-left: 5px; float: left; background-color: rgb(75, 75, 75); -webkit-border-radius: 3px;
}
#container{margin:0;background: none;}
.fui-list-angle span.text-danger{color: #ef4f4f;}
</style>
<div class='fui-page order-list-page'>
	<div class="jy2-headertopbg">
			<div class="fui-header" style="background:none">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()"></a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff">参与的拼单</div>
			</div>
	 </div>
	<div class="fui-tab fui-tab-danger jy2-headertop" id="tab" style="top:4.2rem">
		<a ng-class="{'external active':pagedata.params.status == 100}" href="javascript:" ng-click="pagedata.params.status=100;tool.get_list('jy_pingdd/myteam/getorder/',true);">全部拼单</a>
		<a ng-class="{'external active':pagedata.params.status == 0}" href="javascript:" ng-click="pagedata.params.status=0;tool.get_list('jy_pingdd/myteam/getorder/',true);">待支付</a>
		<a ng-class="{'external active':pagedata.params.status == 10}" href="javascript:" ng-click="pagedata.params.status=10;tool.get_list('jy_pingdd/myteam/getorder/',true);">拼单中</a>
        <a ng-class="{'external active':pagedata.params.status == 1}" href="javascript:" ng-click="pagedata.params.status=1;tool.get_list('jy_pingdd/myteam/getorder/',true);">拼单成功</a>
        <a ng-class="{'external active':pagedata.params.status == 5}" href="javascript:" ng-click="pagedata.params.status=5;tool.get_list('jy_pingdd/myteam/getorder/',true);">拼单失败</a>
	</div>
    <div class='fui-content' style="padding-bottom:0;top:4.8rem;position: absolute;">
		<div class='fui-content-inner' ng-if="!pagedata.list || pagedata.list.length==0">
			<div class='content-empty'>
				<i class='icon icon-lights'></i><br/>暂时没有参加任何拼单
			</div>
			<div class="fui-according-group" id="container"></div>
		</div>
		<div ng-repeat="item in pagedata.list" class='lynn_order_item'>
			<div class="external">
				<div class='lynn_order_title'>
					订单号: {{item.ordersn}}
					<span ng-if="item.teamid==0" class="order_status" style="float:right;"> 还未开拼 </span>
					<span ng-if="item.team.status==1" class="order_status" style="float:right;"> 拼单已成功 </span>
					<span ng-if="item.teamid && item.team.status==0" class="order_status" style="float:right;"> 拼单进行中 </span>
					<span ng-if="item.team.status==2" class="order_status" style="float:right;"> 拼单已过期 </span>
				</div>
				<div class="fui-list lynn_order_list" style="background:#fff">
					<div class="fui-list-media">
						<img ng-src="{{tomedia(item.goods.image) || '../core/resource/images/nopic.jpg'}}" class="round">
					</div>
					<div class="fui-list-inner">
						<div class="lynn_order_list_title">{{item.goods.title}}</div>
						<div class="lynn_order_list_subtitle">{{item.goods.subtitle}}</div>
					</div>
					<div class='fui-list-angle' style="width:auto">
						<span class='marketprice text-danger'>¥{{item.goods.groupprice}}</span>/{{item.unit||'件'}}<br/>
						x1
					</div>
					<div style="position: absolute;right: 4rem;top:3px;width:3rem;height: 3rem;z-index: 10;">
						<img ng-if="item.status==1"  alt="" width="100%" height="100%" src="/addons/jy_pingdd/resource/images/success.png"/>
						<img ng-if="item.status==2"   alt="" width="100%" height="100%" src="/addons/jy_pingdd/resource/images/fail.png"/>
					</div>
				</div>
				<div class='lynn_order_price'>
					<span class='status'>
						运费: <span class='text-danger'>¥{{item.dispatchprice || '0.00'}}</span>元, 共 <span class='text-danger'>1</span> 个商品
						总额: <span class='text-danger'>¥{{item.price}}</span>元
					</span>
					<span class='r-f'>{{item.createtime}}</span>
				</div>
			</div>
			<div class='lynn_order_bottom'>
				<span class="status">
					<a ng-if="item.team.status==1" class="lynn_btn lynn_btn_danger" href="javascript:;" ng-click="access_json('jy_pingdd/goods.detail//id='+item.goods.id)">再拼一单</a>
					<a ng-if="item.teamid>0" class="external lynn_btn lynn_btn_danger" href="javascript:;" ng-click="access_json('jy_pingdd/teamdetail/detail/teamid='+item.teamid)">查看拼单详情</a>
					<a ng-if="item.status==0" class="external lynn_btn lynn_btn_danger" href="javascript:;" ng-click="pay_submit({},'jy_pingdd/myteam/pay/id='+item.id,'jy_pingdd/myteam/','jy_pingdd/myteam/')">支付发起拼单</a>
					<a ng-if="item.team.status==2" class="external lynn_btn lynn_btn_cancel">拼单失败</a>
				</span>
			</div>
		</div>
	 </div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.loading = true;  //状态标记
scope.isnodata = false;
//滚动加载
scope.tool.get_list('jy_pingdd/myteam/getorder/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_pingdd/myteam/getorder/');
}
</script>